Skip to content

If image size is zero, try to get size from media store#125

Closed
tobiasKaminsky wants to merge 3 commits into
masterfrom
zeroImages
Closed

If image size is zero, try to get size from media store#125
tobiasKaminsky wants to merge 3 commits into
masterfrom
zeroImages

Conversation

@tobiasKaminsky

Copy link
Copy Markdown
Member

No description provided.

@mario

mario commented Feb 20, 2018

Copy link
Copy Markdown
Contributor

What if we're uploading something that's not in the media store? :P

In addition, really don't think this is the solution :-/

@tobiasKaminsky

Copy link
Copy Markdown
Member Author

This only happens only for one plus cameras, so far.
All of them are images or videos, so they should be in media store.

Citing myself from the PR in android:

This is a fix for certain OnePlus devices, where the image size taken by the default camera is zero.
I tested it with many images, but still some are uploaded corrupted. This then due to a wrong size reported by media store (instead of 0, it is something between 20-100kb).
So it is better than nothing, but not 100% reliable. As this is only used if file.length() is not working, it should have no impact on other devices.

We can stall this PR until next Hackweek, when we can both try to find a better solution on my real device.

@nextcloud nextcloud deleted a comment Apr 22, 2018
@nextcloud nextcloud deleted a comment Apr 22, 2018
@nextcloud nextcloud deleted a comment May 20, 2018
@nextcloud nextcloud deleted a comment May 20, 2018
@nextcloud nextcloud deleted a comment May 23, 2018
@nextcloud nextcloud deleted a comment May 23, 2018
@nextcloud nextcloud deleted a comment May 25, 2018
@nextcloud nextcloud deleted a comment Jun 12, 2018
@nextcloud nextcloud deleted a comment Jun 20, 2018
@nextcloud nextcloud deleted a comment Jun 21, 2018
@nextcloud nextcloud deleted a comment Aug 2, 2018
@nextcloud nextcloud deleted a comment Aug 29, 2018
@codecov

codecov Bot commented Aug 29, 2018

Copy link
Copy Markdown

Codecov Report

Merging #125 into master will not change coverage.
The diff coverage is 0%.

@@          Coverage Diff          @@
##           master   #125   +/-   ##
=====================================
  Coverage       0%     0%           
=====================================
  Files           2      2           
  Lines         104    105    +1     
  Branches        7      7           
=====================================
- Misses        104    105    +1
Impacted Files Coverage Δ
.../owncloud/android/lib/testclient/TestActivity.java 0% <0%> (ø) ⬆️

tobiasKaminsky and others added 3 commits September 25, 2018 17:42
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
@tobiasKaminsky

Copy link
Copy Markdown
Member Author

closing as it is a fix for minor amount of users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants